package com.ns.scs.mod.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ns.scs.mod.dto.ModPageDto;
import com.ns.scs.mod.entry.Mod;
import com.ns.scs.mod.mapper.ModMapper;
import com.ns.scs.mod.vo.ModVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * Service: admin管理员
 *
 * @author lw
 */
@Service
@RequiredArgsConstructor
@Slf4j
public class ModServiceImpl extends ServiceImpl<ModMapper, Mod> implements IModService {

    private final ModMapper mapper;

    @Override
    public Page<ModVO> getList(ModPageDto dto) {
        return mapper.getList(dto, new Page<>(dto.getCurrent(), dto.getSize()));
    }

    @Override
    public ModVO getByCode(String code) {
        return mapper.getByCode(code);
    }

}
